// 组件文件
import VueRouter from "vue-router";

import home from "./components/tabbar/home.vue";
import member from "./components/tabbar/member.vue";
import ShopCar from "./components/tabbar/ShopCar.vue";
import Search from "./components/tabbar/Search.vue";
import NewList from "./components/NewList/NewList.vue";
import NewInfo from "./components/NewList/NewInfo.vue";
import PhotoList from './components/photos/PhotoList.vue';
import PhotoInfo from './components/photos/PhotoInfo.vue';
import GoodsList from './components/goods/GoodsList.vue';
import GoodsInfo from './components/goods/GoodsInfo.vue';
import GoodsDesc from './components/goods/GoodsDesc.vue';
import GoodsComment from './components/goods/GoodsComment.vue';

const router = new VueRouter({
    routes: [
        { path: "/", redirect: "/home" },
        { path: "/home", component: home },
        { path: "/member", component: member },
        { path: "/shopcar", component: ShopCar },
        { path: "/search", component: Search },
        { path: "/home/newList", component: NewList },
        { path: "/home/newList/:id", component: NewInfo },
        { path: "/home/photolist", component: PhotoList },
        { path: "/home/PhotoInfo/:id", component: PhotoInfo },
        { path: "/home/goodsList", component: GoodsList },
        { path: "/home/goodsInfo/:id", component: GoodsInfo, name: "goodsInfo" },
        { path: "/home/goodsDesc/:id", component: GoodsDesc, name: "goodsDesc" },
        { path: "/home/goodsComment/:id", component: GoodsComment, name: "goodsComment" },
    ],
    linkActiveClass: "mui-active"
})

export default router;